/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Reeks5.VanRansbeeck.Kevin.Model.States.Game;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author sonicah
 */
public class RiverState implements PokerSpelState {
    
    public String getStatus() {
        return "River";
    }

    public void flop(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Flop kan enkel van pre-flop (blinds) komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void turn(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Turn komen we van, we gaan niet terug in de tijd!");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void river(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Dit IS de river.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    public void blinds(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Pre-flop gaat enkel vanuit new state.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    public void showdown(SpelStateContext aThis) {
        // >= 2 spelers nog in game (not-folded/not-new)
        aThis.setSpelState(new ShowdownState());
    }
    
    public void winner(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Winnaar kan alleen vanuit showdown state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void reset(SpelStateContext aThis) {
        try {
            throw new IllegalGameActionException("Reset kan alleen vanuit winnaar state komen.");
        } catch (IllegalGameActionException ex) {
            Logger.getLogger(RiverState.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

}
